<div class="form-group">
	<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span>标题</label>
	<div class="col-sm-9 col-xs-12">
		<input type="text" name="title" id="title" class="form-control" value="{$item['title']}" />
	</div>
</div>



<div class="form-group">
	<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span>所属</label>
	<div class="col-sm-9 col-xs-12">
		<select name="teamid"  class="form-control">
			<option value="0">请选择房产</option>
			{loop $teamlist $vo}
			<option value="{$vo['id']}" {php if($vo['id'] == $item['teamid']) echo 'selected';}>{$vo['housename']}</option>
			{/loop}
		</select>
	</div>
</div>

<div class="form-group">
	<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span>定金</label>
	<div class="col-sm-9 col-xs-12">
		<input type="text" name="dmoney" id="dmoney" class="form-control" value="{$item['dmoney']}" />
	</div>
</div>

<div class="form-group">
	<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span>全款</label>
	<div class="col-sm-9 col-xs-12">
		<input type="text" name="money" id="money" class="form-control" value="{$item['money']}" />
	</div>
</div>


<input type="hidden" name="id" id="id" value="{$item['id']}"/>


<div class="form-group">
	<label class="col-xs-12 col-sm-3 col-md-2 control-label">首图</label>
	<div class="col-sm-9 col-xs-12">
		{php echo tpl_form_field_image('thumb', $item['thumb'], '', array('extras' => array('text' => 'readonly')))}
	</div>
</div>






<div class="form-group">
	<label class="col-xs-12 col-sm-3 col-md-2 control-label">内容详情</label>
	<div class="col-sm-9 col-xs-12">
		{php echo tpl_ueditor('content', $item['content']);}
	</div>
</div>


<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">首页推荐</label>
					<div class="col-sm-9 col-xs-12">
						 <label class='radio-inline'>
							 <input type='radio' name='isrecommand' value=1 {if $item['isrecommand']==1}checked{/if} /> 是
						 </label>
						 <label class='radio-inline'>
							 <input type='radio' name='isrecommand' value=0 {if $item['isrecommand']==0}checked{/if} /> 否
						 </label>
					</div>
				</div>

<div class="form-group">
	<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span>排序</label>
	<div class="col-sm-9 col-xs-12">
		<input type="text" name="sort" id="sort" class="form-control" value="{$item['sort']}" />
	</div>
</div>


</div>


<script language="javascript">

	$(function () {
		var i = 0;
		$('#selectimage').click(function () {
			var editor = KindEditor.editor({
				allowFileManager: false,
				imageSizeLimit: '30MB',
				uploadJson: './index.php?act=attachment&do=upload'
			});
			editor.loadPlugin('multiimage', function () {
				editor.plugin.multiImageDialog({
					clickFn: function (list) {
						if (list && list.length > 0) {
							for (i in list) {
								if (list[i]) {
									html = '<li class="imgbox" style="list-type:none">' +
												'<a class="item_close" href="javascript:;" onclick="deletepic(this);" title="删除"></a>' +
												'<span class="item_box"> <img src="' + list[i]['url'] + '" style="height:80px"></span>' +
												'<input type="hidden" name="attachment-new[]" value="' + list[i]['filename'] + '" />' +
											'</li>';
									$('#fileList').append(html);
									i++;
								}
							}
							editor.hideDialog();
						} else {
							alert('请先选择要上传的图片！');
						}
					}
				});
			});
		});
	});

	function deletepic(obj) {
		if (confirm("确认要删除？")) {
			var $thisob = $(obj);
			var $liobj = $thisob.parent();
			var picurl = $liobj.children('input').val();
			$.post('{php echo $this->createMobileUrl('ajaxdelete',array())}', {pic: picurl}, function (m) {
				if (m == '1') {
					$liobj.remove();
				} else {
					alert("删除失败");
				}
			}, "html");
		}
	}

</script>